package com.fl.nettydemo.agreement;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 从机过压消息信息2（召测消息） –数据上报
 *
 * 相序位
 * 消息总包数
 * 包序号
 * 数据
 */
@NoArgsConstructor
public class DataReport extends HeartBeat implements agreementInterface{
    //相序位 A,B,C
    private String phaseSequence;
    //包总数
    private Integer PackageTotal;
    //包序号
    private Integer PackageNumber;
    //数据
    private String data;

    //校验位
    private Integer CheckBit;

    public DataReport(String IdentificationFrist, String equipmentCode, Integer ByteNum, Integer sign, String IdentificationEnd,
                      String phaseSequence,Integer PackageTotal,Integer PackageNumber,String data,Integer CheckBit) {
        super(IdentificationFrist, equipmentCode, ByteNum, sign, IdentificationEnd);
        this.setData(data);
        this.setPackageNumber(PackageNumber);
        this.setPackageTotal(PackageTotal);
        this.setPhaseSequence(phaseSequence);
        this.setCheckBit(CheckBit);

    }
    public String getPhaseSequence() {
        return phaseSequence;
    }

    public void setPhaseSequence(String phaseSequence) {
        this.phaseSequence = phaseSequence;
    }

    public Integer getPackageTotal() {
        return PackageTotal;
    }

    public void setPackageTotal(Integer packageTotal) {
        PackageTotal = packageTotal;
    }

    public Integer getPackageNumber() {
        return PackageNumber;
    }

    public void setPackageNumber(Integer packageNumber) {
        PackageNumber = packageNumber;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public Integer getCheckBit() {
        return CheckBit;
    }

    public void setCheckBit(Integer checkBit) {
        CheckBit = checkBit;
    }

    @Override
    public String toString() {
        return "DataReport{" +
                "phaseSequence='" + phaseSequence + '\'' +
                ", PackageTotal=" + PackageTotal +
                ", PackageNumber=" + PackageNumber +
                ", data='" + data + '\'' +
                ", CheckBit=" + CheckBit +
                "} " + super.toString();
    }
}
